package com.sz.mes.dto.warehouse;

import com.diboot.core.binding.query.BindQuery;
import com.diboot.core.binding.query.Comparison;
import com.sz.mes.entity.warehouse.Lattice;
import com.sz.mes.entity.warehouse.Shelves;
import com.diboot.iam.entity.IamUser;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * 货架格子 DTO定义
 * @author hem
 * @version 1.0
 * @date 2023-05-25
 * Copyright © szhs
 */
@Getter
@Setter
@Accessors(chain = true)
public class LatticeDTO extends Lattice {

    private static final long serialVersionUID = 8532693749996501790L;

    /**
     * 关联字段 货架名称：Shelves.shelfName
     */
    @BindQuery(comparison = Comparison.EQ, entity = Shelves.class, field = "shelfName", condition = "this.warehouse_shelves_id=id")
    private String warehouseShelvesShelfName;

    /**
     * 关联字段 系统用户.真实姓名：IamUser.realname
     */
    @BindQuery(comparison = Comparison.EQ, entity = IamUser.class, field = "realname", condition = "this.create_by=id")
    private String createByName;

    /**
     * 关联字段 系统用户.真实姓名：IamUser.realname
     */
    @BindQuery(comparison = Comparison.EQ, entity = IamUser.class, field = "realname", condition = "this.update_by=id")
    private String updateByName;
}
